# -*- coding: utf-8 -*-
"""
@Time    : 2024/10/9 17:08 
@Author  : ZhangShenao 
@File    : 4.分割长字符串.py
@Desc    : 分割长字符串
"""
import re


def split_long_string() -> None:
    """分割长字符串"""

    # 定义长字符串
    poem = "窗前明月光，疑是地上霜。举头望明月，低头思故乡。"

    # 调用re.split方法,分割长字符串
    sentences = re.split(pattern=r"([，。, .])", string=poem)

    print(sentences)


if __name__ == '__main__':
    split_long_string()
